package com.lfy.chat.strategy;

import cn.hutool.extra.spring.SpringUtil;
import com.lfy.chat.service.ChatService;
import com.lfy.common.enums.ChatEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

@AllArgsConstructor
@Getter
public class ChatStrategy {
    public static Map<String, ChatTemplate> STRATEGY_MAP = new HashMap<>();
    private static final ChatService chatService;
    static {
        chatService = SpringUtil.getBean("chatServiceImpl");
//        Method[] methods = chatService.getClass().getMethods();
//        for (Method method : methods) {
//            method.getAnnotation()
//        }
        STRATEGY_MAP.put(ChatEnum.LOGIN.getType(), chatService::login);


    }



}
